<?php

namespace app\common\model;

use EasyWeChat\Factory;
use think\Exception;
use think\Model;

/**
 * 邮箱验证码
 */
class BannerModel extends Model
{
    protected $autoWriteTimestamp = true;
    protected $name = 'banner';


    public function getBanner(){
        $list = self::where(['status' => 1])->order('sort desc')->select();
        foreach ($list as $key => &$value){
            $value['img'] = config('app.api_url').$value['img'];
        }
        return ['code' => 200, 'msg' => '获取信息成功', 'data' => $list];
    }

}
